package com.wanbangee.marksystem.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.wanbangee.marksystem.entities.UGrade;
import com.wanbangee.marksystem.service.StatistisGradeReportService;

@RestController
@RequestMapping(value="/userGrade")
public class StatistisGradeReportController {
    @Autowired
	public StatistisGradeReportService statistisGradeReportService;
    
    @RequestMapping(value="/getGradeBy",method=RequestMethod.GET)
    public Map<String,Object> selectGradeBySchId(@RequestParam("schId")Integer schId){
    	Map<String, Object> responseMap = new HashMap<String, Object>();
		List<UGrade> uGrade = this.statistisGradeReportService.selectGrade(schId);
		responseMap.put("message", "接口成功");
		responseMap.put("code", 1001);
		responseMap.put("uGrade", uGrade);
		return responseMap;
    }
}
